package DCSource;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Time {
	public Time(){}
	public String getYear(){
		SimpleDateFormat sdf = new SimpleDateFormat("YY");
		return sdf.format(new Date());
	}
	public String getMouth(){
		SimpleDateFormat sdf = new SimpleDateFormat("MM");
		return sdf.format(new Date());
	}
	public String getDay(){
		SimpleDateFormat sdf = new SimpleDateFormat("DD");
		return sdf.format(new Date());
	}
	public String getHour(){
		SimpleDateFormat sdf = new SimpleDateFormat("hh");
		return sdf.format(new Date());
	}
	public String getMinute(){
		SimpleDateFormat sdf = new SimpleDateFormat("mm");
		return sdf.format(new Date());
	}
	public String getSecound(){
		SimpleDateFormat sdf = new SimpleDateFormat("ss");
		return sdf.format(new Date());
	}
	public int getTimeCount(){
		Date now = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat("YY");
		int re = Integer.valueOf(sdf.format(now));
		sdf = new SimpleDateFormat("MM");
		re = re*100+Integer.valueOf(sdf.format(now));
		sdf = new SimpleDateFormat("DD");
		re = re*1000+Integer.valueOf(sdf.format(now));
		sdf = new SimpleDateFormat("hh");
		re = re*100+Integer.valueOf(sdf.format(now));
		sdf = new SimpleDateFormat("mm");
		re = re*100+Integer.valueOf(sdf.format(now));
		sdf = new SimpleDateFormat("ss");
		re = re*100+Integer.valueOf(sdf.format(now));
		return re;
	}
	public int getDayTimeCount(){
		Date now = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat("hh");
		int re = Integer.valueOf(sdf.format(now));
		sdf = new SimpleDateFormat("mm");
		re = re*100+Integer.valueOf(sdf.format(now));
		sdf = new SimpleDateFormat("ss");
		re = re*100+Integer.valueOf(sdf.format(now));
		return re;
	}
}
